package com.zhanghu.backendZray.controller.douyin;

import com.zhanghu.backendZray.pojo.dto.ApiResponse;
import com.zhanghu.backendZray.pojo.vo.douyin.DouyinHotVo;
import com.zhanghu.backendZray.service.DouyinHotService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 抖音热点 前端控制器
 * </p>
 *
 * @author zhangdong
 * @since 2025-01-20
 */
@RestController
@RequestMapping("douyinHot")
@RequiredArgsConstructor
public class DouyinHotController {
    private final DouyinHotService douyinHotService;

    /**
     * 获取抖音热点
     */
    @GetMapping("getHot")
    public ApiResponse<List<DouyinHotVo>> getHot() {
        List<DouyinHotVo> list = douyinHotService.getHot();
        return ApiResponse.ok(list);
    }
}
